<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonEdit.jsp"%>
<%@ include file="/commons/dateTime.jsp" %>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>许可证发证详细</title>
<script type="text/javascript" src="${ctx }/scripts/public3.js"></script>
<script type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script type="text/javascript">

	function resize(){
		parent.window.document.all('proceduresDetailFrm').style.height=document.body.scrollHeight;
	}

	function setDays(){
		var beginDate =  $('beginDate').value;
		var endDate=$('endDate').value;

		endList = endDate.split("-")
		endDate = new Date(endList[1] + '-' + endList[2] + '-' + endList[0]) //转换为12-18-2002格式

		beginList = beginDate.split("-")
		beginDate = new Date(beginList[1] + '-' + beginList[2] + '-' + beginList[0])

		if (beginDate > endDate){
			$('renovateDays').innerText = "";
			return ;
		}

		var iDays = parseInt(Math.abs(endDate - beginDate) / 1000 / 60 / 60 /24) //把相差的毫秒数转换为天数

		if (isNaN(iDays)){
			$('renovateDays').innerText ="";
		}else{
			$('renovateDays').innerText = iDays+1;
		}

	}

	function init(){  //初始化
		resize();
		setDays();
	}
</script>
</head>


<body onload="init();" >
<div style=" height:350px; overflow: auto;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="middle" class="content"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="container_in_show">
      <tr>
        <td valign="top">
            <div id="tab_Search" style="height:316px;">
               <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
                      <tr>
                        <td><table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
                          <tr>
			    <td class="aux_intable_td1">楼 栋： </td>
			    <td class="aux_intable_td2">${requisitionVO.buildingName }</td>
			    <td class="aux_intable_td1">现场负责人：</td>
			    <td class="aux_intable_td2">${requisitionVO.burdenMan }</td>
                          </tr>
			  <tr>
			    <td class="aux_intable_td1">房 号：</td>
			    <td class="aux_intable_td2">${requisitionVO.houseNumber }</td>
			    <td class="aux_intable_td1">现场负责人联系电话：</td>
			    <td class="aux_intable_td2">${requisitionVO.burdenManPhone }</td>
			  </tr>
			  <tr>
			  <td class="aux_intable_td1">业主姓名：</td>
              <td class="aux_intable_td2">${requisitionVO.clientNames }</td>
              <td class="aux_intable_td1">防火负责人：</td>
              <td class="aux_intable_td2">${requisitionVO.fireproofingMan }</td>
			  </tr>
            <tr>
              <td class="aux_intable_td1">许可证号：</td>
              <td class="aux_intable_td2">${licenceVO.licenceNumber }</td>
              <td class="aux_intable_td1">装修施工期限：</td>
              <td class="aux_intable_td2">
            	 <input type="hidden" id="beginDate" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${licenceVO.beginDate}'/>">
            	<input type="hidden" id="endDate" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${licenceVO.endDate}'/>">
            	从&nbsp;
            	<fmt:formatDate pattern='yyyy-MM-dd' value='${licenceVO.beginDate}'/>&nbsp;到&nbsp;
            	<fmt:formatDate pattern='yyyy-MM-dd' value='${licenceVO.endDate}'/>&nbsp;共&nbsp;
            	<span id="renovateDays"></span> &nbsp;天</td>
            </tr>
            <tr>
              <td class="aux_intable_td1">发证状态：</td>
              <td class="aux_intable_td2">	${licenceVO.renovateLicenceStateView } </td>
              <td class="aux_intable_td1">发证时间：</td>
              <td class="aux_intable_td2">${licenceVO.transactDate }</td>
            </tr>
            <tr>
              <td class="aux_intable_td1">装修单位：</td>
              <td class="aux_intable_td2">${requisitionVO.companyName }</td>
              <td class="aux_intable_td1">经办人：</td>
              <td class="aux_intable_td2">${licenceVO.transactor }</td>
            </tr>
            <tr>
              <td valign="top" class="aux_intable_td1">装修项目：</td>
              <td class="aux_intable_td2" valign="top">${requisitionVO.items }</td>
              <td valign="top" class="aux_intable_td1">备 注：</td>
              <td class="aux_intable_td2">${licenceVO.remark }</td>
            </tr>

            <tr>
              <td colspan="4" class="aux_titletable">进场确认</td>
            </tr>
            <tr>
              <td colspan="4" valign="top" class="aux_intable_td1">

              <div style="overflow: auto; height: 80px">
					<ec:ceTable items="confirmItemList"
								autoIncludeParameters="true"
								var="item"
								action=""
								rowsDisplayed="${totalRows}"
								width="100%"
								view="pmsNoPageView"
								sortable="false"
								styleClass="gridData"
							>
						<ec:ceRow styleClass="grid" >
							<ec:ceColumn width="15%" property="#"  cell="rowCount" headerCell="pmsHeadrCell"  title="序号" />
							<ec:ceColumn width="20%"  property="itemConfig" headerCell="pmsHeadrCell"  title="确认项目"/>
							<ec:ceColumn width="45%"  property="remark" headerCell="pmsHeadrCell"  title="备注"/>
							<ec:ceColumn width="15%"  property="checkYn" headerCell="pmsHeadrCell" title="是否确认" showTitle="false" >
									<input type="checkbox" name="checkbox3" value="checkbox"  disabled="true" <c:if test="${item.checkYn == '1' }"> checked="checked" </c:if> />
							</ec:ceColumn>
						</ec:ceRow>
					</ec:ceTable>
			</div>

              </td>
            </tr></table></td>
                      </tr>
                </table>
			</div>
			</div>
		  </td>
      </tr>
    </table>
	</td>
  </tr>

</table>

</div>
</body>
</html>